<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"  
      >

    <body>
        <ui:composition template="./WEB-INF/template/template_login.xhtml">

            <ui:define name="content" >
                <p:growl id="growl" life="3000"/>
                <h:form id="form">  
                    <p:dialog id="dialog" header="Login" widgetVar="dlg" resizable="false">  

                        <h:panelGrid columns="2" cellpadding="5">  
                            <h:outputLabel for="username" value="Username:" />  
                            <p:inputText value="#{loginBean.username}"   
                                         id="username" required="true" label="username" />  

                            <h:outputLabel for="password" value="Password:" />  
                            <h:inputSecret value="#{loginBean.password}"   
                                           id="password" required="true" label="password" />  

                            <f:facet name="footer">  
                                <p:commandButton id="loginButton" value="Login"    
                                                 action="#{loginBean.login}"   
                                                 oncomplete="handleLoginRequest(xhr, status, args)" ajax="false"/>  
                            </f:facet>  
                        </h:panelGrid>  

                    </p:dialog>  
                </h:form>  
                <h:panelGrid >
                    <h1>Montoro Turismo</h1>
                    <p:outputLabel value="es una aplicación movil destinada al turismo y el ocio, con la que podrás visitar Montoro y conocer su historia. Además 
                                   tendrás toda la información de restaurantes y alojamientos y sus ofertas diarias." />

                    <h:panelGrid columns="3" styleClass="panelGridCenter" cellpadding='5'>
                        <h:graphicImage  url="resources/images/mapa.png" height="300" />
                        <h:graphicImage  url="resources/images/principal.png" height="350" />
                        <h:graphicImage  url="resources/images/restaurantes.png" height="300" />
                    </h:panelGrid>

                    <a style="float: right" href="https://play.google.com/store/apps/details?id=org.turistmontoro">
                        <img alt="Get it on Google Play"
                             src="https://developer.android.com/images/brand/es_generic_rgb_wo_45.png" />
                    </a>

                </h:panelGrid>



            </ui:define>

        </ui:composition>

    </body>
</html>
